import {
    BrowserRouter,
    Routes,
    Route,
    Link,
    Navigate
} from 'react-router-dom'
// import Home from './views/Home.jsx'
// import About from './views/About.jsx'
import routes from './router/index.js'
function App() {
    return ( < BrowserRouter >
        <div> 
            <ul>
                <li><Link to="/home">GoHome</Link></li>
                <li><Link to="/about">列表页面</Link></li>
                <li><Link to="/tiaozhuan">跳转页面</Link></li>
            </ul>
        </div> 
        <div>
            <Routes>
                {
                    routes.map((v,i)=><Route key={i} path={v.path} element={v.element}></Route>)
                }
            </Routes>
        </div>
        </BrowserRouter>)
    }
    export default App